<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Examples</title>
    <meta name="description" content="">
    <meta name="keywords" content="">
    <link href="" rel="stylesheet">
</head>

<body>
    <div id="bit"></div>
</body>

</html>
<script>
var bit = "000011";
var statu = new Array();

// bit = parseInt(bit, 2);
bit = bit.toString();

statu = bit.split("")
console.log(statu)

statu = statu.join("")
console.log(statu)

statu = parseInt(statu, 2);
console.log(statu)

document.getElementById('bit').innerHTML = bit
</script>
